﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CommonTest
{
    public class TestMakeCode
    {
        public static void MakeCode()
        {
            List<string> codes = new List<string>();
            for (int i = 0; i < 13; i++)
            {
                codes.Add(i + "");
            }

            int len = codes.Count / 3, j = 0;
            string code = "", code2 = "", code3 = "";
            for (; j < len; j++)
            {
                code = codes[j * 3];
                code2 = codes[j * 3 + 1];
                code3 = codes[j * 3 + 2];
            }
            int q = codes.Count % 3;
            if (q == 1)//有余数
            {
                code = codes[j * 3];
            }
            else if (q == 2)
            {
                code = codes[j * 3];
                code2 = codes[j * 3 + 1];
            }

            int k = 0;
            for (; k < len * 3;)
            {
                code = codes[k];
                code2 = codes[k + 1];
                code3 = codes[k + 2];
                k += 3;

            }
            if (q == 1)//有余数
            {
                code = codes[k];
            }
            else if (q == 2)
            {
                code = codes[k];
                code2 = codes[k + 1];
            }
        }

    }
}
